package demo2;

import demo1.TestDemo;

/**
 * @User: vitobo
 * @Date: 2024-05-23
 * @Description:
 */

class A{ }

class B extends A{ }

// 密封类, 类C不能再被继承
final class C extends B{ }

class Student{ }

class Teacher{ }

// 组合, 将一个类的实例作为另一个类的字段
class School{
    public Student[] students;
    public Teacher[] teachers;
}


public class Test extends TestDemo {


    public void test(){
        TestDemo testDemo = new TestDemo();
        System.out.println(super.a);
    }

    public static void main(String[] args) {

        Test t = new Test();
        t.test();
    }
}
